package com.gxar.marketdelivery.infra.dao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@TableName("market_delivery_plan")
public class DeliveryPlanEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String FIELD_DELIVERY_SET_ID = "delivery_set_id";
    public static final String FIELD_RES_SLOT_ID = "res_slot_id";
    public static final String FIELD_PLAN_NAME = "plan_name";
    public static final String FIELD_PRIORITY = "priority";
    public static final String FIELD_TOTAL_SHOW_COUNT = "total_show_count";
    public static final String FIELD_PLAN_STATUS = "plan_status";

    public static final String FIELD_STATUS = "status";

    public static final String FIELD_ID = "id";

    public static final String FIELD_GMT_MODIFY = "gmt_modify";

    public static final String FIELD_GMT_CREATE = "gmt_create";

    public static final String FIELD_MODIFIER = "modifier";

    public static final String FIELD_CREATOR = "creator";

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 投放组id
     */
    private Long deliverySetId;

    /**
     * 资源位id
     */
    private Long resSlotId;

    /**
     * 投放计划名称
     */
    private String planName;

    /**
     * 优先级
     */
    private Integer priority;

    /**
     * 计划状态(0:待上线， 1:已上线， 2: 已下线，3:已过期，9:彻底结束)
     */
    private Integer planStatus;

    /**
     * 有效状态(0:无效，1:有效)
     */
    private Integer status = 1;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 修改人
     */
    private String modifier;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_modify", fill = FieldFill.INSERT_UPDATE)
    private Date gmtModify;
}
